<?php
Route::group(['prefix' => 'ad', 'namespace' => 'Ad', 'as' => 'ad.'], function () {

    /**
     * 广告管理
     */
    Route::group(['prefix'=>'advert'],function (){

        //多选删除
        Route::delete('delete_all','AdvertController@delete_all')->name('advert.delete_all');
        //排序
        Route::patch('sort_order','AdvertController@sort_order')->name('advert.sort_order');
        //改变属性
        Route::patch('change_attr','AdvertController@change_attr')->name('advert.change_attr');
    });
    //广告资源路由
    Route::resource('advert','AdvertController');


    /**
     * 分类管理
     */
    Route::group(['prefix'=>'category'],function (){

        //排序
        Route::patch('sort_order','CategoryController@sort_order')->name('category.sort_order');
    });

    Route::resource('category','CategoryController');
});